package com.online.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.online.entity.FillQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FillQuestionMapper {
    /**
     * 增加填空题信息
     * @param fillQuestion
     * @return
     */
    int add(FillQuestion fillQuestion);

    /**
     * 查询最后一条questionId
     * @return
     */
    FillQuestion findOnlyQuestionId();

    List<FillQuestion> findByIdAndType(Integer paperId);

    List<Integer> findBySubject(String subject, Integer fillNumber);

    @Select("select * from fill_question")
    IPage<FillQuestion> findAll(Page page);

}
